package desmontec.sistema

//import desmontec.sistema.*;


class SecUser {

	String username
	String password
	boolean enabled
	boolean accountExpired
	boolean accountLocked
	boolean passwordExpired

	// lenin.medeiros - INICIO
	static constraints = {
		username blank: false, unique: true, size:5..10		
		password blank: false, size:5..64
	}
	// lenin.medeiros - FIM

	static mapping = {
		password column: '`password`'
	}

	Set<SecRole> getAuthorities() {
		SecUserSecRole.findAllBySecUser(this).collect { it.secRole } as Set
	}
	
	/*// lenin.medeiros - INICIO
	def usuario1 = new SecUser(username: 'usuario1', password: 'senha1', enabled: true)
	// lenin.medeiros - FIM*/
		
	
}
